import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("firmware", { schema: "charge" })
export class Firmware {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("tinyint", {
    name: "charge_type",
    comment: "充电方式",
    default: () => "'0'",
  })
  chargeType: number;

  @Column("varchar", { name: "name", length: 50 })
  name: string;

  @Column("varchar", { name: "remark", length: 50 })
  remark: string;

  @Column("varchar", { name: "file", length: 100 })
  file: string;

  @Column("smallint", {
    name: "size",
    comment: "文件大小",
    unsigned: true,
    default: () => "'0'",
  })
  size: number;

  @Column("int", {
    name: "update_time",
    comment: "更新时间",
    unsigned: true,
    default: () => "'0'",
  })
  updateTime: number;

  @Column("int", {
    name: "create_time",
    comment: "结束时间",
    unsigned: true,
    default: () => "'0'",
  })
  createTime: number;
}
